<template>
  <div class="shang">
    <el-form :model="form" label-width="auto" style="max-width: 600px">
      <el-form-item label="类型">
        <el-select v-model="form.region">
          <el-option value="区域1" />
          <el-option value="区域2" />
        </el-select>
      </el-form-item>
      <el-form-item label="图像大小">
        <el-select v-model="form.region">
          <el-option value="大尺寸" />
          <el-option value="小尺寸" />
        </el-select>
      </el-form-item>
      <el-form-item label="图像大小">
        <el-input v-model="form.name" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
        <el-button>新增</el-button>
      </el-form-item>
    </el-form>
  </div>

  <div class="xia">
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="date" label="名称" width="180" />
      <el-table-column prop="name" label="区域" width="180" />
      <el-table-column prop="address" label="图片大小" width="180" />
      <el-table-column prop="date" label="详情" width="180" />
      <el-table-column prop="date" label="图片" width="180" />
      <el-table-column prop="date" label="操作" width="180" />



    </el-table>
  </div>

  <div class="demo-pagination-block">
    <div class="demonstration">All combined</div>
    <el-pagination
      v-model:current-page="currentPage4"
      v-model:page-size="pageSize4"
      :page-sizes="[100, 200, 300, 400]"
      :small="small"
      :disabled="disabled"
      :background="background"
      layout="total, sizes, prev, pager, next, jumper"
      :total="400"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: ""
      },
      tableData: [
        {
          date: "2016-05-03",
          name: "Tom",
          address: "No. 189, Grove St, Los Angeles"
        },
        {
          date: "2016-05-02",
          name: "Tom",
          address: "No. 189, Grove St, Los Angeles"
        },
        {
          date: "2016-05-04",
          name: "Tom",
          address: "No. 189, Grove St, Los Angeles"
        },
        {
          date: "2016-05-01",
          name: "Tom",
          address: "No. 189, Grove St, Los Angeles"
        }
      ],
      currentPage4: 5,
      pageSize4:5
    }
  },
  watch: {
    obj: {
      handler(newVal, oldVal) {
        console.log("obj 发生变化:", newVal, oldVal)
      }
      // deep: true, // 深度观察 obj 的变化
    }
  },

  methods: {
    onSubmit() {
      this.$emit("sonfn", 789)
    },
    handleCurrentChange() {
      this.$emit("sonfn", 789)
    },
    handleSizeChange() {
      this.$emit("sonfn", 789)
    },

  }
}
</script>
